local initfn = nil

function initfn(k, v, opts)
	opts = opts or {}

	-- if opts.iter == true then
	-- 	local o = {}
	-- 	for k,v in pairs(opts)do
	-- 		o[k] = v
	-- 	end
	-- 	o.iter = nil
	-- 	for k,v in pairs(k)do
	-- 		initfn(k, v, o)
	-- 	end
	-- 	return true
	-- end
	v.key = k
	
	if v.init_ds then
		v.build = k
		v.bank = k
		v.anim = "idle"
		v.anim_float = "idle_water"

		v.name = STRINGS.NAMES[k:upper()]
		v.desc = STRINGS.RECIPE_DESC[k:upper()]
	elseif v.init_dst then
		v.build = "rg_"..k
		v.bank = "rg_"..k
		v.anim = "idle"
		v.anim_float = "idle"
	elseif v.init_rg then
		v.build = "rg_"..k
		v.bank = "rg_"..k
	elseif v.init_skip then
		-- pass
	else
		error("init not defined. See \"rg_datainit.lua\".")
	end

	if opts.isweapon == true then
		if v.init_ds then
			v.build_onhand = "swap_"..v.build
			v.symbol = "swap_"..v.build
		elseif v.init_dst then
			v.build_onhand = "rg_swap"..v.key
			v.symbol = "swap_"..v.key
		else
			v.build_onhand = v.build
			v.symbol = "swap_object"
		end
	end
end

return initfn